package sorter;

import java.util.*;

public class ListSorter {
    public static void main(String[] args) {
        List<Employee> employees
                = new ArrayList<>();
        employees.add(new Employee("张三", 34, (double) 1802f));
        employees.add(new Employee("张", 33, (double) 1801f));
        employees.add(new Employee("张0", 50, (double) 1803f));
        Collections.sort(employees, new Comparator<Employee>() {
            @Override
            public int compare(Employee o1, Employee o2) {
                return o1.getAge() - o2.getAge();
            }
        });
        System.out.println(employees);
        int [][]a = new int[100][];
        Arrays.sort(a, new Comparator<int[]>() {
            @Override
            public int compare(int[] o1, int[] o2) {
                return o1[1]-o2[1];
            }
        });
        Arrays.sort(a, ((o1, o2) -> o1[1]-o2[1]));
        Arrays.sort(a, Comparator.comparingInt((o -> o[1])));

    }
}
